<template>
    <div>
        welcome!
        <div>
            <el-cascader size="large" :options="options" v-model="selectedOptions" @change="handleChange">
            </el-cascader>
        </div>
    </div>
</template>
<script>

    import { regionData, CodeToText } from "element-china-area-data"

    export default {
        data() {
            return {
                options: regionData,
                selectedOptions: []
            };
        },

        methods: {
            handleChange() {
                var loc = "";
                for (let i = 0; i < this.selectedOptions.length; i++) {
                    loc += CodeToText[this.selectedOptions[i]];
                }
                alert(loc);
            }
        }
    }
</script>
<style lang="less" scoped>

</style>